//
//  FAddressCell.swift
//  Aiwei
//
//  Created by zhu xietong on 2017/11/1.
//  Copyright © 2017年 zhu xietong. All rights reserved.
//

import Foundation
import Eelay


open class FGlobalAddressCell: SimpleFieldCell<GlobalPlaceField> {
  

    
    open override func mo_model_reload() {
        super.mo_model_reload()
        titleL.text = mo.model["title",""]
    }

    
    open var selectorModel:NSMutableDictionary{
        get{
            return field.mo.model
        }
    }

}


open class FAddressCell: SimpleFieldCell<PlaceField> {
    
//    open override func addLayoutRules() {
//        super.addLayoutRules()
//         contentView.eelay = [
//            [titleL,FieldCell.name_width.+1000,],
//            [field,[ee.T.B,[0,0]],[titleL,ee.R,ee.L,8],[rightIcon,ee.L,ee.R,-8]],
//        ]
//    }
    
    open override func mo_model_reload() {
        super.mo_model_reload()
        titleL.text = mo.model["title",""]
    }
//    @objc func edit() {
//        weak var wself = self
//        let value  = selectorModel[FK.value,""]
//
//        let alertController = UIAlertController(title: "自定义楼层", message: "", preferredStyle: UIAlertControllerStyle.alert)
//
//        let cancelAction = UIAlertAction(title: "取消", style: UIAlertActionStyle.default, handler: {
//            (action : UIAlertAction!) -> Void in
//
//        })
//        let saveAction = UIAlertAction(title: "确定", style: UIAlertActionStyle.default, handler: {
//            alert -> Void in
//
//            let f = alertController.textFields![0] as UITextField
//            if let t = f.text
//            {
//                if t.len > 0
//                {
//                    wself?.selectorModel[FK.value] = t
//                    wself?.selectorModel["_value"] = ""
//                    wself?.selector1.mo_model_reload()
//                }
//            }
//        })
//
//
//
//        alertController.addTextField { (textField : UITextField!) -> Void in
//            textField.placeholder = "请输入自定义楼层，如6跃7"
//            if value.len > 0
//            {
//                textField.text = value
//            }
//        }
//
//        alertController.addAction(cancelAction)
//        alertController.addAction(saveAction)
//
//        self.content_controller?.present(alertController, animated: true, completion: nil)
//    }
    
    
    open var selectorModel:NSMutableDictionary{
        get{
            return field.mo.model
        }
    }
    
    
   
    
    
    
    
}
